import axios from "../../index.js";
// 考勤统计

// 考勤统计列表
export const getAttendanceListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceList",
    method: "post",
    data: data
  });
};
// 获取单位部门树
export const getUnitTreeApi = (data) => {
  return axios.request({
    url: "/system/organization/tree",
    method: "post",
    data: data
  });
};
// 迟到统计列表
export const getAttendanceLateListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceLateList",
    method: "post",
    data: data
  });
};
// 早退统计列表
export const getAttendanceEarlyListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceEarlyList",
    method: "post",
    data: data
  });
};
// 缺勤统计列表
export const getAttendanceAbsenteeismListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceAbsenteeismList",
    method: "post",
    data: data
  });
};
// 请假统计列表
export const getAttendanceLeaveListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceLeaveList",
    method: "post",
    data: data
  });
};
// 未及时接班统计列表
export const getAttendanceShiftingOfDutyListApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/getAttendanceShiftingOfDutyList",
    method: "post",
    data: data
  });
};
// 统计导出
export const onExportApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportStatistics",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 迟到导出
export const exportLateApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportLate",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};

// 早退导出
export const exportEarlyApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportEarly",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};

// 缺勤导出
export const exportAbsenceApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportAbsenteeism",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 请假导出
export const exportLeaveApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportLeave",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 交接班导出
export const exportTakeApi = (data) => {
  return axios.request({
    url: "/duty/dutyAttendance/exportTake",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
